package symbol;

public class SymbolTableItem {
	public String name;
	public String type;
	// 维度
	public String dimCount;
	
	public SymbolTableItem(String name, String type) {
		this.name = name;
		String[] typeInfoList = type.split("_");
		this.type = typeInfoList[0];
		if (typeInfoList.length == 2) this.dimCount = typeInfoList[1];
	}
	
	public String typeToString() {
		if (dimCount == null || dimCount == "0") {
			return type;
		} else return type + "_" + dimCount;
	}
}
